package org.jackysoft.service;

import java.io.File;
import java.util.Collection;
import java.util.concurrent.ExecutionException;

import org.jackysoft.data.IDataProvider;
import org.jackysoft.entity.User;
import org.jackysoft.entity.ViewFile;
import org.springframework.dao.DataAccessException;

public interface ViewFileService extends IDataProvider<String,ViewFile>{
	
	Boolean canSendable(ViewFile f) throws DataAccessException;;
    

    void create(ViewFile f,Long workflowId) throws DataAccessException ,InterruptedException, ExecutionException;
  
    void remove(Collection<ViewFile> fs) throws DataAccessException;
    
    void dispatch(boolean uploaded,ViewFile bean,Long workflowId,File upLoad,String upLoadFileName) throws InterruptedException, ExecutionException ;
    /**
     * 删除文件用户
     * 
     * */
    void releaseUser(User owner)  throws DataAccessException;
    
    void markReader(ViewFile f,User user)throws DataAccessException;
    
    boolean hasReaded(ViewFile f,User user)throws DataAccessException;
    
    ViewFile reSend(ViewFile f)throws DataAccessException;   
   
   
     
}
